import React from "react"
import { View, Image, Text } from "@remax/wechat"

export default () => {

  const menuList = [
    { id: 1, ico: 'https://s1.ax1x.com/2021/12/09/ohu3kD.png', title: '个人信息' },
    { id: 2, ico: 'https://s1.ax1x.com/2021/12/09/ohut1A.png', title: '校长信箱' },
    { id: 3, ico: 'https://s1.ax1x.com/2021/12/09/ohuGfH.png', title: '学校简介' },
    { id: 4, ico: 'https://s1.ax1x.com/2021/12/09/ohuw0f.png', title: '团队管理' },
    { id: 5, ico: 'https://s1.ax1x.com/2021/12/09/ohuYpd.png', title: '学生缴费' },
    { id: 6, ico: 'https://s1.ax1x.com/2021/12/09/ohudnP.png', title: '投票选举' },
    { id: 7, ico: 'https://s1.ax1x.com/2021/12/09/ohu8te.png', title: '直播活动' },
    { id: 8, ico: 'https://s1.ax1x.com/2021/12/09/ohuN6I.png', title: '积分签到' },
    { id: 9, ico: 'https://s1.ax1x.com/2021/12/09/ohuUXt.png', title: '考试答题' }
  ]

  const MenuItem = ({ props }) => {

    const { ico, title } = props

    return (
      <View className="cl_home_menu_item">
        <Image src={ico} mode="widthFix" />
        <Text>{title}</Text>
      </View>
    )
  }

  return (
    <View className="cl_home">
      <View className="cl_home_header">
        <View className="cl_hh_info">
          <Image src="https://s1.ax1x.com/2021/12/09/ohVqPA.png" mode="widthFix" />
          <Text>admin</Text>
        </View>
      </View>
      <View className="cl_home_menu">
        {
          menuList.map(item => {
            return <MenuItem key={item.id} props={{ ico: item.ico, title: item.title }} />
          })
        }
      </View>
    </View>
  )
}